In [2]:
import numpy as np
import pandas as pd
import pymc3 as pm
import matplotlib.pyplot as plt
%matplotlib inline
In [28]:
df = pd.DataFrame({"FPSA":np.array([ 11444., 20570., 31026., 47132., 65090., 67032., 83713.,
89785., 113910., 91562., 53267., 32098., 24499.])}, index = [ 3848.9, 4484.7, 5225.5, 6088.7, 7094.5, 8266.4, 9631.9,
11223.0, 13077.0, 15237.0, 17754.0, 20687.0, 24104.0])
df.plot(logy=True)
Out[28]:
In [29]:
df.plot(logy=False)
Out[29]:
In [34]:
df.loc[12000:].plot(logy=False)
Out[34]:
In [ ]:
# fit a Normal and expontial tail
with pm.Model() as model:
norm_mu = pm.Flat('norm_mu')
norm_sd = pm.Flat('norm_sd')
norm = pm.Normal('norm', mu=norm_mu, sd=norm_sd, observed=df.values)
trace = pm.sample()
In [ ]:
p